-- GENERATED SPELL FOR [Harpoon Master Yavus] --


function spell0_24644(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(48193,pUnit)
pUnit:RegisterEvent('Sorts_24644', 10295, 1)
end

function spell1_24644(pUnit, Event) --@Grievous Slash,n/a--
pUnit:FullCastSpellOnTarget(48286,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24644', 10000, 1)
end

function spell2_24644(pUnit, Event) --@Harpoon Throw,n/a--
pUnit:FullCastSpellOnTarget(48283,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24644', 850, 1)
end

function Sorts_24644(pUnit, Event)
local choix_sorts_24644 = math.random(0, 2)
if choix_sorts_24644 == 0 then
pUnit:RegisterEvent('spell0_24644', 1, 1)
end
if choix_sorts_24644 == 1 then
pUnit:RegisterEvent('spell1_24644', 1, 1)
end
if choix_sorts_24644 == 2 then
pUnit:RegisterEvent('spell2_24644', 1, 1)
end
end

function mob24644_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24644', math.random(1500, 3000), 1)
end

function mob24644_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24644_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24644_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24644, 1, 'mob24644_Action')
RegisterUnitEvent(24644, 2, 'mob24644_Leave')
RegisterUnitEvent(24644, 3, 'mob24644_Kill')
RegisterUnitEvent(24644, 4, 'mob24644_Die')
